#include<iostream>
#include <thread>
#include "teacher.h"
#include "student.h"
using namespace std;

int main()
{
	teacher* TeacherA = new Math_Teacher("TeacherA");
	teacher* TeacherB = new En_Teacher("TeacherB");
	Student* StudentA = new Student("StudentA", { TeacherA });
	Student* StudentB = new Student("StudentB", { TeacherA, TeacherB });
	Student* StudentC = new Student("StudentC", { TeacherB });
	TeacherA->add_stu(StudentA);
	TeacherA->add_stu(StudentB);
	TeacherB->add_stu(StudentB);
	TeacherB->add_stu(StudentC);
	StudentA->get_teacher();
	StudentB->get_teacher();
	StudentC->get_teacher();
	TeacherA->set_content("Homework is Discrete Mathematics");
	TeacherB->set_content("Homework is Business English");
	cout << StudentA->get_content() << endl;
	cout << StudentB->get_content() << endl;
	cout << StudentC->get_content() << endl;
	StudentC->add(TeacherA);
	TeacherA->add_stu(StudentC);
	StudentC->get_teacher();
	TeacherA->set_content("Homework is Linear Algebra");
	cout << StudentC->get_content() << endl;
	StudentB->del_homework(TeacherB);
	TeacherB->delete_stu(StudentB);
	cout << StudentB->get_content() << endl;
	delete TeacherA;
	delete TeacherB;
	delete StudentA;
	delete StudentB;
	delete StudentC;
	return 0;
}


